Ext.define('Admin.view.employment.ChangeEmploymentGrid', {
    extend: 'Ext.grid.Panel',

    xtype: 'changeEmploymentGrid',
    id:'changeEmploymentGrid',
    //store: 'Companies',

    layout: 'fit',
	bind: '{employmentDataList}',
    columns: [{
        text: 'Id',
        dataIndex: 'id'
    },{
        text: 'EmpId',
        dataIndex: 'empId',
        flex: 1,
        hideable: false
    }, {
        width: 140,
        text: 'TimeLimit',
        dataIndex: 'timeLimit'
    }],
    //width: 750,
    //height: 450,
    //leadingBufferZone: 8,
    //trailingBufferZone: 8,

    plugins: [{
        ptype: 'rowwidget',

        // The widget definition describes a widget to be rendered into the expansion row.
        // It has access to the application's ViewModel hierarchy. Its immediate ViewModel
        // contains a record and recordIndex property. These, or any property of the record
        // (including association stores) may be bound to the widget.
        //
        // See the Order model definition with the association declared to Company.
        // Every Company record will be decorated with an "orders" method which,
        // when called yields a store containing associated orders.
        widget: {
            xtype: 'grid',
            autoLoad: true,
           	title: '详细内容',
       		bind: '{employmentDataList}',
            //bind: {
                //store: '{record.orders}',
            //},
            columns: [{
                xtype: 'datecolumn',
                format: 'Y-m-d',
                flex:1,
                text: 'UnderWriteDate',
                dataIndex: 'underWriteDate'
            }, {
                xtype: 'datecolumn',
                format: 'Y-m-d',
                width: 265,
                text: 'OverDate',
                dataIndex: 'overDate'
            },{
                xtype: 'datecolumn',
                format: 'Y-m-d',
                width: 265,
                text: 'BreakDate',
                dataIndex: 'breakDate'
            },{
                text: 'BreakReason',
                sortable: false,
                dataIndex: 'breakReason',
                width: 200
	            },{
                text: 'Remark',
                dataIndex: 'remark',
               	sortable: false,
                width: 200
            }]
        }
    }],
    title: "合同信息"
})